Modern computer systems running applications such as databases, virtual desktop infrastructure, and data analytics have a large main-memory footprint. As systems scale out, the demands for larger data storage capacity increase linearly. While memory technology advances aggressively to meet the growing needs for a large memory having a small footprint, memory module-level techniques such as inline compression or deduplication may be applied to further increase the virtual capacity of a memory module. For example, when exposing a memory capacity to a memory controller, a memory module implemented with an inline compression and/or deduplication can increase its virtual memory capacity as much as 2 to 3 times than its physical memory capacity. The implementation of memory module-level techniques may further require changes to the entire memory system to allow for a system-level control.
Unfortunately, the virtual memory capacity of a memory module that can be increased by inline compression or deduplication depends on the dataset that is being stored in the memory module. While some datasets with redundancy can lend to good compression and deduplication, other datasets may not be suitable for compression or deduplication. In addition, the efficiency for data compression/deduplication changes dynamically during an application runtime as data is modified. The exposure of a dynamically varying virtual capacity of a memory module to applications may need non-trivial changes to the software stack of a computer system. For example, an operating system (OS) of a host computer can accommodate the dynamically varying virtual capacity by closely managing memory paging and swapping to a memory module. However, such modifications require the customization of the OS kernel, making its adaptation difficult and costly.